package com.xiaoh.dormitoryrepairreportbackend.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 维修类别表
 */
@TableName(value = "repair_category")
@Data
@Schema(description = "维修类别表")
public class RepairCategory implements Serializable {

    /**
     * 类别ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @Schema(description = "类别ID")
    private Integer id;

    /**
     * 类别名称
     */
    @TableField(value = "category_name")
    @Schema(description = "类别名称")
    private String categoryName;

    /**
     * 类别描述
     */
    @TableField(value = "description")
    @Schema(description = "类别描述")
    private String description;

    /**
     * 是否启用(0:禁用, 1:启用)
     */
    @TableField(value = "is_active")
    @Schema(description = "是否启用(0:禁用, 1:启用)")
    private Integer isActive;

    /**
     * 创建时间
     */
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    @Schema(description = "创建时间")
    private LocalDateTime createdAt;

    /**
     * 更新时间
     */
    @TableField(value = "updated_at", fill = FieldFill.INSERT_UPDATE)
    @Schema(description = "更新时间")
    private LocalDateTime updatedAt;

    /**
     * 逻辑删除(0:未删除, 1:已删除)
     */
    @TableField(value = "is_deleted")
    @TableLogic
    @Schema(description = "逻辑删除(0:未删除, 1:已删除)")
    private Integer isDeleted;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
